@extends('layout.blog')
@section('title')
    多人博客
@endsection
@section('content')
    <div class="main">
        <div class="tag_header"><span>文章</span>
            <form action="http://google.com/search" method="get" target="_blank" class="search">
                <div class="search_box">
                    <input type="text" name="q" class="search_input">
                    <input type="hidden" name="q" value="site:tech.meituan.com">
                    <input type="hidden" name="gw_rd" value="cr">
                    <input type="submit" id="search_submit">
                    <label for="search_submit"></label>
                </div>
            </form>
        </div>
        <section class="post-list">
        <div>
            @if(!empty($articles))
                @foreach($articles as $article)
                    <article class="post post-with-tags">
                        <header class="post-title">
                            <a href="{{ route('archives.details', ['id' => $article->id]) }}">{{ $article->title }}</a>
                        </header>
                        <div class="post-meta"><span class="post-meta-author">{{ $article->user_name }}</span>
                            <span class="post-meta-ctime">{{ $article->created_at }}</span>
                        </div>
                        <p class="post-abstract">
                            {{ $article->description }}

                        </p>

                        <footer class="post-tags">
                            @if(is_array($article->cate_arr))
                                @foreach($article->cate_arr as $cate)
                                    <a href="{{ route('blog.index', ['cate_id' => $cate['id']]) }}" class="tag">
                                        <span class="tag_name">{{ $cate['name'] }}</span>
                                    </a>
                                @endforeach
                            @else
                                <a href="#" class="tag">
                                    <span class="tag_name">未分类</span>
                                </a>
                            @endif
                        </footer>
                    </article>
                @endforeach
            @endif
        </div>
        <footer class="more"><span class="rectangle"><a href="/?l=40" class="btn">查看更多</a></span></footer>
    </section>
    </div>
@endsection
